﻿using UnityEngine;


[ExecuteInEditMode]
public abstract class Gate : MonoBehaviour
{ 
    public TMPro.TextMeshPro contentText;
    public TMPro.TextMeshPro titleText;

    public Material blueBGMat;
    public Material redBGMat;
    public Material blueTitleBGMat;
    public Material redTitleBGMat;

    public Renderer bg;
    public Renderer titleBG;
    
    protected virtual void Start()
    {
        UpdateUI();
    }
    
    // Start is called before the first frame update
    public abstract void UpdateUI();

/*
#if UNITY_EDITOR
    private int m_OldAddValue = -1;
    private int m_OldMultiValue = -1;
    void CheckUpdateUIShow()
    {
        //if (this.addValue != m_OldAddValue || this.multiValue != m_OldMultiValue)
        {
            m_OldAddValue = addValue;
            m_OldMultiValue = multiValue;
            
            UpdateUI();
        }
    }
#endif
*/

    // Update is called once per frame
    void Update()
    {
#if UNITY_EDITOR
        UpdateUI();
#endif
    }
}